package com.xiaoma.lib.log.impl

import android.content.Context
import android.util.Log
import com.xiaoma.seres.lib.log.ILog

/**
 * author: liangjingbo
 * date: 2022/6/17
 * describe:
 */
class AndroidLog : ILog {

    private var lowLevelLogPrintEnable = true
    private var showLog = true

    override fun init(context: Context, uid: String) {

    }

    override fun setShowLog(showLog: Boolean) {
        this.showLog = showLog
    }

    override fun isShowLog(): Boolean {
        return showLog
    }

    override fun setLowLevelLogPrintEnable(lowLevelLogPrintEnable: Boolean) {
        this.lowLevelLogPrintEnable = lowLevelLogPrintEnable
    }

    override fun isLowLevelLogPrintEnable(): Boolean {
        return lowLevelLogPrintEnable;
    }

    override fun v(tag: String, msg: String) {
        Log.v(tag, msg)
    }

    override fun v(tag: String, msg: String, tr: Throwable?) {
        Log.v(tag, msg, tr)
    }

    override fun d(tag: String, msg: String) {
        Log.d(tag, msg)
    }

    override fun d(tag: String, msg: String, tr: Throwable?) {
        Log.d(tag, msg, tr)
    }

    override fun i(tag: String, msg: String) {
        Log.i(tag, msg)
    }

    override fun i(tag: String, msg: String, tr: Throwable?) {
        Log.i(tag, msg, tr)
    }

    override fun w(tag: String, msg: String) {
        Log.w(tag, msg)
    }

    override fun w(tag: String, msg: String, tr: Throwable?) {
        Log.w(tag, msg, tr)
    }

    override fun e(tag: String, msg: String) {
        Log.e(tag, msg)
    }

    override fun e(tag: String, msg: String, tr: Throwable?) {
        Log.e(tag, msg, tr)
    }
}